

import {  Toast } from 'antd-mobile'

let load:any  = null;
export const ShowLoading = (msg='加载中')=>{
    Toast.clear()
    load = Toast.show({
        icon: 'loading',
        content: msg,
        duration:2000
    })
}

export const ShowSuccess = (msg='成功')=>{
    Toast.clear()
    Toast.show({
        icon: 'success',
        content: msg,
        duration:1000
    })
}

export const ShowFail = (msg='失败')=>{
    Toast.clear()
    Toast.show({
        icon: 'fail',
        content: msg,
        duration:1000
    })
}

export const ShowToast = (msg='')=>{
    Toast.clear()
    Toast.show({
        content: msg,
        duration:1500
    })
}

export const CloseToast = ()=>{
    Toast.clear()
    // load.close()
}